﻿using Customer.Model.Interface;

namespace Customer.Provider
{
    public class ProviderFactory : IProviderFactory
    {
        private ICustomerProvider customers = null;
        public ICustomerProvider Customers
        {
            get
            {
                if (customers == null) customers = new CustomerProvider();
                return customers;
            }
        }
        private IExportCustomerProvider exportCustomers = null;
        public IExportCustomerProvider ExportCustomers
        {
            get
            {
                if (exportCustomers == null) exportCustomers = new ExportCustomerProvider();
                return exportCustomers;
            }
        }
        private ICustomerAlertProvider customerAlerts = null;
        public ICustomerAlertProvider CustomerAlerts
        {
            get
            {
                if (customerAlerts == null) customerAlerts = new CustomerAlertProvider();
                return customerAlerts;
            }
        }
        private IBranchProvider branchs = null;
        public IBranchProvider Branchs
        {
            get
            {
                if (branchs == null) branchs = new BranchProvider();
                return branchs;
            }
        }

        private IPortfolioProvider portfolios = null;
        public IPortfolioProvider Portfolios
        {
            get
            {
                if (portfolios == null) portfolios = new PortfolioProvider();
                return portfolios;
            }
        }
    }
}
